// import { http } from "../utils/http";
import http from "../utils/http/service";

// 获取用户菜单树
export const getMenuTree = (data): any => {
  return http.post("/rdms-admin/sysMenu/getMenuTree", data);
};

// 获取菜单列表
export const getMenuList = (data): any => {
  return http.post("/rdms-admin/sysMenu/menuList", data);
};

// 新增菜单
export const addMenuList = (data): any => {
  return http.post("/rdms-admin/sysMenu/add", data);
};

// 编辑菜单
export const updateMenuList = (data): any => {
  return http.post("/rdms-admin/sysMenu/update", data);
};

// 删除菜单
export const deleteMenuList = (data): any => {
  return http.post("/rdms-admin/sysMenu/delete", data);
};

// 获取用户权限菜单
export const getAsyncRoutes = (data): any => {
  return http.post("/rdms-admin/sysMenu/getMenuTree", data);
};
